Latex Basics in R

Hello World from Latex

Hello! This is my first  document.

Inline Math Expression


Rectangle has sides \((x+1)\) and \((x+3)\).

The equation of \({A(x) = x^2+4x+3}\) gives the area of rectangle.


Block Math Expression

The equation of \[{A(x) = x^2+4x+3}\] gives the area of rectangle.

Superscripts

\[2x^3+5\] \[2x^{34}+5\] \[2x^{3x+4}\] \[2x^{3x^4+5}\] \[2x^{(3x^{45}+5)}+1000\]

Subscripts

\[x_1\] \[x_{12}\] \[x_{1_2}\] \[x_{1_{2_3}}\] \[x_{1_{2_{35}}}\] \[a_0,a_1,a_2,\ldots,a_{100}\]

Greek Letters

\[\pi\] \[\Pi\] \[\alpha\] \[A = \pi r^2\]

Trigonometric Functions

\[y = \sin x\] \[y = \cos x\] \[y = \csc\theta\] \[y = \cos^{-1}x\]

Log Functions

\[y = \log x\] \[y = \log_5 x\] \[y = \ln_5 x\]

Roots

\[\sqrt{4}\] \[\sqrt[4]{3}\] \[\sqrt{x^2+y^2}\] \[\sqrt{ 1+ \sqrt{x} }\]

Fraction

\[\frac{2}{5}\] About \(\dfrac{2}{3}\) of the glass is full.\[16pt] About \(\frac{2}{3}\) of the glass is full. \[\frac{\sqrt{x+1}}{\sqrt{x+2}}\] \[\frac{\sqrt{x+1}}{\sqrt{x}+2}\] \[\frac{1}{ 1+\frac{1}{x} }\]

Brackets

The distributive property states that \(a(c+b) = ac+ab\), for all \(a,b,c \in \mathbb{R}\). The equivalence class of \(a\) is \([a]\).Set \(A\) = \(\{1,2,3\}\). Movie Ticketcost \(\$11.25\)

\[2\left(\frac{1}{x^2-1}\right)\] \[2\left[\frac{1}{x^2-1}\right]\] \[2\left\{\frac{1}{x^2-1}\right\}\]

\[2\left\langle \frac{1}{x^2-1} \right\rangle\] \[2\left | \frac{1}{x^2-1} \right |\] \[ \left.\frac{dy}{dx}\right|_{x = 1}\] \[ \left|\frac{dy}{dx}\right|_{x = 1}\]

\[\left(\frac{1}{1+\left(\frac{1}{1+x}\right)}\right)\]

Tables

\[ \begin{array}{|c|c|c|} \hline \textbf{Column 1} & \textbf{Column 2} & \textbf{Column 3} \\ \hline Row 1, Cell 1 & Row 1, Cell 2 & Row 1, Cell 3 \\ Row 2, Cell 1 & Row 2, Cell 2 & Row 2, Cell 3 \\ \hline \end{array} \]

\[\begin{array}{|c||c|c|c|c|c|} \hline x & 1 & 2& 3 &4 &5 \\ \hline f(x) &10 & 11 & 12& 13& 14\\ \hline \end{array}\]

Arrays:

\[\begin{align} 5x^2-9=x+3\\ 5x^2-x-12 = 0 \end{align}\] \[\begin{align*} 5x^2-9&=x+3\\ 5x^2-x-12 &= 0\\ &=12+x-3x^2 \end{align*}\]

Calculus

The function \(f(x) = (x-3)^2+\frac{1}{2}\) had domain \(\mathrm{D}_f:(-\infty,\infty)\) and range \(\mathrm{R}_f:\left[\frac{1}{2},\infty\right)\)

\(\lim\limits_{x \to a^{-1}}f(x)\)

\(\displaystyle{\lim\limits_{x \to a}\frac{f(x)-f(a)}{x-a} = f'(a)}\)

\(\displaystyle{\int \sin x\,dx = -\cos x+C}\)

\(\int\limits_a^b\)

\(\displaystyle{\int\limits_a^b}\)

\(\displaystyle{\int\limits_{a}^{b}x^2\,dx =\left[\frac{x^3}{3}\right]_{a}^{b} = \frac{b^3}{3}-\frac{a^3}{3}}\)

\(\displaystyle{\sum\limits_{n=1}^{\infty}ar^n = a+ar + ar^2+ \cdots+ar^n}\)

\(\displaystyle{\int_a^bf(x) \,dx = \lim \limits_{x \to \infty}\sum \limits_{k=1}^{n}f(x_k) \cdot \Delta x}\)

\(\vec{v} = v_1\vec{i}+ v_2 \vec{j} = \langle v_1, v_2 \rangle\)

\(\displaystyle{\frac{dy}{dx}}\)

Some More Latex Commands

Latex Commands:Download

Output pdf:Download